package com.gsta.ifishery.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 首页 . <br>
 * 
 * @author xh
 */
@Controller
public class IndexController {

    /**
     * 跳转到index.jsp
     * 
     * @return
     */
    @RequestMapping({ "/", "/login" })
    public String login() {
        return "index";
    }

    /**
     * 跳转到sys_index
     * 
     * @return
     */
    @RequestMapping("/sysIndex")
    public String sysIndex() {
        return "sys/sys_index";
    }

    /**
     * 跳转到sys_index
     * 
     * @return
     */
    @RequestMapping("/sysLeft")
    public String sysLeft() {
        return "sys/left";
    }

    /**
     * 跳转到sys_index
     * 
     * @return
     */
    @RequestMapping("/sysHead")
    public String sysHead() {
        return "sys/head";
    }

    /**
     * 跳转到sys_index
     * 
     * @return
     */
    @RequestMapping("/sysFoot")
    public String sysFoot() {
        return "sys/foot";
    }

    /**
     * 跳转到sys_index
     * 
     * @return
     */
    @RequestMapping("/homePage")
    public String homePage() {
        return "homePage";
    }

    @RequestMapping("/logoutAction")
    public String logout(HttpServletRequest request,
            HttpServletResponse response) {
        request.getSession().setAttribute("sysUser", null);
        return "session";
    }

    /**
     * 跳转到sys_index
     * 
     * @return
     */
    @RequestMapping("/selectInstallDevice")
    public String selectInstallDevice() {
        return "select/selectInstallDeviceList";
    }
}
